﻿using Digitalmes.Events;
using Digitalmes.Model;
using Digitalmes.Services;
using NPOI.SS.Formula.Functions;

namespace Digitalmes.Models
{
    public interface ISysTag 
    {
        public long? EquipmentId { get; }

        public string Description { get; }

        string OpCode { get; set; }     

        string Name { get; }
        string Address { get;  }
        object Value { get; set; }
        TypeCode ValueType { get; }
     
        bool IsReadOnly { get; }
        DateTime LastUpdateTime { get; }

        TagAccessModeEnum AccessMode { get;  }

        DataQuality Quality { get; set; }
        VariableScope Scope { get; } // 新增变量作用域
        IDriver Driver { get; set; }


        public string DriverGroup { get; } 

        public List<ISysTag> TagGroup { get; set; }
        TagDefineEnum TagType { get; }
        TagGroupEnum GroupType { get; }

        event EventHandler<TagValueChangedEventArgs> ValueChanged;

        void SetValue(object value);


        public decimal? UpLimit { get; }
        public decimal? LowerLimit { get; }
        public bool ActiveLimit { get; }
        public string EquipCode { get; }
        public bool IsValid { get; }

      


    }
}
